# encoding: UTF-8

class Site::ReportController < ApplicationController

  layout 'site'

  def index
    @report = Bug.did_status.paginate(:page => params[:page], :per_page => '8')
    @category = ['游戏建议&BUG反馈']
    @categories = Topic.categories
    @newto = Manual.open_status.newto_all
    @gamedata = Level.open_status.level_guides
    @gamerole = Role.open_status.all
    @gamefeature = Feature.open_status.all
    @gameequip = Sort.open_status.equips_sorts
    set_seo_meta '游戏建议&BUG反馈'

  end

  def create
    @report = Bug.new(params[:bug])
    if @report.save!
      redirect_to report_path, notice: '提交成功,我们会在第一时间处理您提交的信息!'
    else
      redirect_referrer_or_default default
    end  
  end

end
